home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / dc1 / hash.a < prev    next >
Text File  |  1993-01-17  |  398b  |  29 lines

  1. ;xxxx Prototype long hash(register ubyte *buf, register short bytes);
  2. ;XXX deleted, prototype is in sym.c
  3.  
  4.         ;   HASH.A
  5.         ;
  6.         ;
  7.  
  8.         section text,code
  9.  
  10.         xdef    _hash
  11.         xdef    @hash
  12.  
  13. _hash        move.l    4(sp),A0
  14.         move.l    8(sp),D0
  15. @hash
  16.         move.l    D2,-(sp)
  17.         moveq.l #0,D1        ; v
  18.         bra    henter
  19. hloop        rol.w    #5,D1
  20.         move.b    (A0)+,D2
  21.         eor.b    D2,D1
  22. henter        dbf    D0,hloop
  23.         move.l    D1,D0
  24.         move.l    (sp)+,D2
  25.         rts
  26.  
  27.         END
  28.  
  29.